package com.ctshk.rpc.hotel.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ctshk.rpc.hotel.entity.HotelProductStrategyDate;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * 酒店产品加幅有效期 Mapper 接口
 * </p>
 *
 * @author yinhuan
 * @since 2021-03-03
 */
public interface HotelProductStrategyDateMapper extends BaseMapper<HotelProductStrategyDate> {
    /**
     * 据渠道加幅日期查询产品加幅详情信息
     * @param queryDate
     * @return
     */
    @Select("<script>"+"select id,increase_strategy_id,date_begin,date_end from t_hotel_product_strategy_date \n" +
            "where date_begin &lt;= #{queryDate} and date_end &gt;= #{queryDate}\n" +
            "</script>")
    List<HotelProductStrategyDate> queryList(@Param("queryDate") LocalDate queryDate);
}
